# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-py3270
_pkgname=py3270
pkgver=0.3.4
pkgrel=1
epoch=1
pkgdesc='A Python interface to x3270, an IBM 3270 terminal emulator.'
arch=('any')
url='https://pypi.python.org/pypi/py3.80/0.2.0'
license=('custom:unknown')
depends=('python2' 'python2-six')
makedepends=('python2-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
        'LICENSE')
sha512sums=('4bcaeec17cf819bf88bcff8be7e59ffbc63260d54a9d115adb37b90139a12e7061acd1e006d5856733d0a15c123efbf036569a03c3ec8eb711e78a141ff94575'
            '0d1540a2077131cdd882ddb6b792ff78d99b8345f5eb7851544cd357c31a0045bc91a16434b067e9c64c7e9cca7855c5896d70d1741928a8e265a3a95d156d49')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  install -Dm 644 ../LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

